<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <title>DatePicker</title>
    <link href="/kissy/src/css/assets/dpl/base.css" rel="stylesheet"/>
    <link href="../assets/picker.css" rel="stylesheet"/>
    <link href="../assets/month-panel.css" rel="stylesheet"/>
    <link href="../assets/year-panel.css" rel="stylesheet"/>
    <link href="../assets/decade-panel.css" rel="stylesheet"/>
    <style>
        a:focus {
            color: red;
        }
    </style>
</head>
<body>
<a id="prev" href="#">prev link</a>

<div id="holder">

</div>
<a id="next" href="#">next link</a>

<div id="result">

</div>
</body>
<script src="/kissy/build/seed.js"></script>
<script src="/kissy/src/package.js"></script>
<script>
    KISSY.config('lang','en-us');
    KISSY.use('node,date/picker,date/format', function (S, Node, DatePicker, DateFormat) {
        var result = Node.all('#result');
        var picker = new DatePicker({
            disabledDate: function (current, value) {
                return current.getMonth() < value.getMonth();
            },
            // showWeekNumber:false,
            // showToday:false,
            render: '#holder'
        }).render();

        picker.on('select', function (e) {
            var value = e.value;
            if (value) {
                result.html(DateFormat.getDateInstance(DateFormat.Style.FULL).format(value));
            } else {
                result.html('null');
            }
        });
    });
</script>
</html>